﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KeywordAuction;

namespace KeywordAuction
{
    public class DoubleKeywordAdvertiser :Advertiser
    {
        public DoubleKeywordAdvertiser()
        {
            //this.Strategies.Add(new StrategyRaiseHold());
            //this.Strategies.Add(new StrategyHoldRaise());
            //this.Strategies.Add(new StrategyHoldDrop());
            //this.Strategies.Add(new StrategyDropRaise());
            //this.Strategies.Add(new StrategyDropHold());
            //this.Strategies.Add(new StrategyRaiseAll());
            //this.Strategies.Add(new StrategyHoldAll());
            //this.Strategies.Add(new StrategyDropAll());
            //this.Strategies.Add(new StrategyRaiseDrop());

            //this.Strategies.Add(new strate
        }

        public DoubleKeywordAdvertiser CreateDoubleKeywordAdvertiser(AuctionHost host)
        {
            var advertiser = new DoubleKeywordAdvertiser();
            foreach (var item in host.Adspots)
            {
                var bid = AdvertiserBidding.CreateAdvertiserBidding(advertiser, item);
                advertiser.Biddings.Add(bid);
                item.Bitting.Add(bid);

                bid.ExpectedRevenue = new Random().Next(10, 100);
            }
            advertiser.AttendingAuction = host;
            return advertiser;
        }
    }
}
